#include <stdio.h>
#include <stdlib.h>
#include<string.h>
//16 串中数累加和
int main()
{
    char s[100];
    gets(s);
    int len=strlen(s),sum=0,temp;
    for(int i=0;i<len;i++){
        temp=0;
        if(s[i]-'0'>=0&&s[i]-'9'<=0){
            temp=s[i]-'0';
            i++;
            while(s[i]-'0'>=0&&s[i]-'9'<=0){
                temp = temp*10 +(s[i]-'0');
                i++;
            }
        }
        sum+=temp;
    }
    printf("%d",sum);
    return 0;
}
